package design.Mediator;

/**
 * Created by looper on 2017/8/28.
 */
public class ResearchDepartment extends Department {
  public ResearchDepartment(String name, Mediator mediator) {
    super(name, mediator);
  }

  //接受其他部门的消息
  @Override
  public void getMessage(String message) {
    System.out.println("研发部刚刚收到消息 : "+message);
  }

  //向其他部门发送消息
  public void sendMessage(ResearchDepartment researchDepartment, String message) {
    mediator.contact(researchDepartment,message);
  }

}
